package com.whmnx.chitchat.adapter;

import android.content.Context;
import android.content.Intent;
import android.text.TextUtils;
import android.view.View;
import android.widget.ImageView;

import com.classic.adapter.BaseAdapterHelper;
import com.classic.adapter.CommonRecyclerAdapter;
import com.whmnx.chitchat.R;
import com.whmnx.chitchat.bean.GroupDatailBean;
import com.whmnx.chitchat.bean.UserBean;
import com.whmnx.chitchat.ui.chat.FriendInfoActivity;
import com.whmnx.chitchat.utils.ImageUtil;

import java.util.ArrayList;
import java.util.List;

/**
 * author : huang
 * date   : 2020/7/27 0027 17:31
 * version: 1.0
 * @author Administrator
 */
public class UserAdpter4 extends CommonRecyclerAdapter<GroupDatailBean.GroupMembersListBean> {
    private Context context;
    private List<Boolean> alreadyLikeList = new ArrayList<>();
    private ImageView view;


    public UserAdpter4(Context context) {
        super(context, R.layout.item_list_user2);
        this.context = context;
    }


    @Override
    public void onUpdate(BaseAdapterHelper helper, GroupDatailBean.GroupMembersListBean item, int position) {
        if (TextUtils.isEmpty(item.getUserNick())){
            helper.setText(R.id.tv, (String) item.getUserName());
        }else {
            helper.setText(R.id.tv, (String) item.getUserNick());
        }

        ImageUtil.setImage(helper.getView(R.id.cv_user),item.getHeadImg());

    }
}
